﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ComboBoxPage.aspx.cs" Inherits="Mobile.Web.Form.ComboBoxPage" %>
<%@ Register TagPrefix="mob" Namespace="Mobile.WebControls" Assembly="AMF" %>
<%@ Register TagPrefix="mob" Namespace="Mobile.WebControls.Field" Assembly="AMF" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head> 
	<title>Combobox example</title> 
	
	<meta name="viewport" content="width=device-width, initial-scale=1"> 

    <mob:MobileResourcesManager ID="MobileResourcesManager1" runat="server"/>
</head> 
<body>


    <mob:MobilePage ID="mbPage1" runat="server">
        <Header>
            <h1>Combobox example</h1>
        </Header>
        <Content>
            <p>
            <h2>Simple Combobox</h2>
            <mob:ComboBox ID="cbCountry" DataTextField="Name" DataValueField="Name" FieldName="combo" LabelText="Choose a car" runat="server"></mob:ComboBox>
            </p>
            <p>
            <h2>Combobox with custom menu</h2>
            To use custom menu, set the DataNativeMenu property to "false"
            If you want a text by default, set the title property. You've to be careful with that property, only works with DataNativeMenu at false.
            <mob:ComboBox ID="cbCountry2" Title="Choose Options" DataNativeMenu="false" DataTextField="Name" DataValueField="Name" FieldName="combo" LabelText="Choose a car" runat="server"></mob:ComboBox>
            </p>
            <p>
            <h2>Combobox with groupby option</h2>
            To use Group By, you've to set DataGroupByField
            <mob:ComboBox ID="cbCountry3" DataGroupByField="Country" DataTextField="Name" DataValueField="Name" FieldName="combo" LabelText="Choose a car" runat="server"></mob:ComboBox>
            </p>
            <p>
            <h2>Combobox with multiple select option</h2>
            To use the multiple select option, you've to set MultipleSelect to "true"
            <mob:ComboBox ID="cbCountry4" MultipleSelect="true" DataTextField="Name" DataValueField="Name" FieldName="combo" LabelText="Choose a car" runat="server"></mob:ComboBox>
            </p>
        </Content>
        <Footer>
            <h1>Footer</h1>
        </Footer>
    </mob:MobilePage>


</body>
</html>